package day4.HomeWork;

import day4.Persion;

import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;

public class A {
    public static void main(String[] args) throws NoSuchMethodException, ClassNotFoundException, InvocationTargetException, InstantiationException, IllegalAccessException {
        Class c = Class.forName("day4.Persion");
        Constructor con  = c.getDeclaredConstructor(Integer.class);
        con.setAccessible(true);
        Persion p = (Persion) con.newInstance(100);
        System.out.println(p);
    }
}
